{{#if is_emoji}}
    {{#if has_image}}
        <img class="emoji" src="{{ img_src }}" />
    {{else}}
        <span class='emoji emoji-{{ emoji_code }}'></span>
    {{/if}}
{{else if is_person}}
    {{#if user_circle_class}}
    <span class="{{user_circle_class}} user_circle"></span>
    {{/if}}
    {{#if has_image}}
    <img class="typeahead-image" src="{{ img_src }}" />
    {{else}}
    <span class='typeahead-image fa fa-bullhorn no-presence-circle'></span>
    {{/if}}
{{else if is_user_group}}
    <i class="typeahead-image zulip-icon zulip-icon-triple-users no-presence-circle" aria-hidden="true"></i>
{{/if}}
{{!-- Separate container to ensure overflowing text remains in this container. --}}
<div class="typeahead-text-container{{#if has_secondary_html}} has_secondary_html{{/if}}">
    <strong class="typeahead-strong-section">
        {{~#if stream~}}
            {{~> inline_decorated_stream_name stream=stream ~}}
            {{~else~}}
            {{~ primary ~}}
        {{~/if~}}
    </strong>
    {{~#if has_pronouns}}
        <span class="pronouns">({{pronouns}})</span>
    {{~/if}}
    {{~#if should_add_guest_user_indicator}}
        <i>({{t 'guest'}})</i>
    {{~/if}}
    {{~#if has_status}}
    {{> status_emoji status_emoji_info}}
    {{~/if}}
    {{~#if has_secondary_html}}
    <span class="autocomplete_secondary rendered_markdown single-line-rendered-markdown">{{rendered_markdown secondary_html}}</span>
    {{~else if has_secondary}}
    <span class="autocomplete_secondary">
        {{~ secondary ~}}
    </span>
    {{~/if}}
</div>
{{#if is_unsubscribed}}
    <span class="fa fa-exclamation-triangle unsubscribed_icon"
      title="{{t 'You are not currently subscribed to this channel.' }}"></span>
{{/if}}
